package com.csap.framework.oauth2.server.entity;
import com.csap.framework.annotation.apidoc.Description;
import com.csap.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import lombok.Builder;
import java.io.Serializable;
import java.lang.Override;
import com.csap.framework.oauth2.server.model.PermissionsModel;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.Data;
import lombok.AllArgsConstructor;
import com.csap.mybatisplus.annotation.TableId;
import lombok.NoArgsConstructor;
import com.csap.mybatisplus.extension.activerecord.Model;
import com.csap.mybatisplus.annotation.TableName;
/**
 * <p>
 * 权限
 * </p>
 *
 * @author yangchengfu
 * @dateTime 2021-07-25 23:51:30
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "permissions")
@Description(value = "权限实体类")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class PermissionsEntity extends Model<PermissionsEntity, PermissionsModel> {
    /**
     * 权限ID
     */
    @TableId(type = IdType.AUTO, value = "permissions_id")
    private Long permissionsId;
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 权限名称
     */
    private String name;
    /**
     * 权限描述
     */
    private String descr;
    /**
     * 权限值
     */
    private String value;
    /**
     * 是否删除
     */
    private Integer del;
    /**
     * 是否可用
     */
    private Integer enabled;
     @Override
     protected Serializable pkVal(){
         return this.permissionsId;
      }

}
